using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._TopographicProductionTools._Workflow._DataManagement
{
    /// <summary>
    /// <para>Copy Job Files</para>
    /// <para>Copies Workflow Manager (Classic) job files to and from a local machine and a shared directory for processing.</para>
    /// <para>将 Workflow Manager （Classic） 作业文件复制到本地计算机和共享目录以进行处理。</para>
    /// </summary>    
    [DisplayName("Copy Job Files")]
    public class CopyJobFiles : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CopyJobFiles()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_job_id">
        /// <para>Job ID</para>
        /// <para>The Job ID of the Workflow Manager (Classic) job that will be updated.</para>
        /// <para>将更新的 Workflow Manager （Classic） 作业的作业 ID。</para>
        /// </param>
        /// <param name="_source_path">
        /// <para>Source Path</para>
        /// <para>The path to the folder containing the files to be copied.</para>
        /// <para>包含要复制的文件的文件夹的路径。</para>
        /// </param>
        /// <param name="_target_path">
        /// <para>Target Path</para>
        /// <para>The path to the location where the files will be copied.</para>
        /// <para>文件复制位置的路径。</para>
        /// </param>
        public CopyJobFiles(long? _job_id, object _source_path, object _target_path)
        {
            this._job_id = _job_id;
            this._source_path = _source_path;
            this._target_path = _target_path;
        }
        public override string ToolboxName => "Topographic Production Tools";

        public override string ToolName => "Copy Job Files";

        public override string CallName => "topographic.CopyJobFiles";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_job_id, _source_path, _target_path, _archive_source.GetGPValue(), _delete_source.GetGPValue(), _create_job_folder.GetGPValue(), _database_path, _updated_job_id];

        /// <summary>
        /// <para>Job ID</para>
        /// <para>The Job ID of the Workflow Manager (Classic) job that will be updated.</para>
        /// <para>将更新的 Workflow Manager （Classic） 作业的作业 ID。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Job ID")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long? _job_id { get; set; }


        /// <summary>
        /// <para>Source Path</para>
        /// <para>The path to the folder containing the files to be copied.</para>
        /// <para>包含要复制的文件的文件夹的路径。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Source Path")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _source_path { get; set; }


        /// <summary>
        /// <para>Target Path</para>
        /// <para>The path to the location where the files will be copied.</para>
        /// <para>文件复制位置的路径。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Target Path")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _target_path { get; set; }


        /// <summary>
        /// <para>Archive Source Files</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the files in the source path will be zipped before copying to the target location.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—A .zip file with the contents of the source directory will be created and copied to the target location.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The contents of the source directory will be copied directly to the target location. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定在复制到目标位置之前是否压缩源路径中的文件。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将创建包含源目录内容的.zip文件并将其复制到目标位置。</bullet_item><para/>
        ///     <bullet_item>未选中 - 源目录的内容将直接复制到目标位置。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Archive Source Files")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _archive_source_value? _archive_source { get; set; } = null;

        public enum _archive_source_value
        {
            /// <summary>
            /// <para>ARCHIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ARCHIVE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_ARCHIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_ARCHIVE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Delete Source Files</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the files in the source path will be deleted after the files are copied to the target location.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The source directory and all its contents will be deleted after the files are copied.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The source directory will not be deleted after the files are copied. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将源路径中的文件复制到目标位置后是否删除这些文件。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 复制文件后，将删除源目录及其所有内容。</bullet_item><para/>
        ///     <bullet_item>未选中 - 复制文件后不会删除源目录。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Delete Source Files")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _delete_source_value? _delete_source { get; set; } = null;

        public enum _delete_source_value
        {
            /// <summary>
            /// <para>DELETE_SOURCE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DELETE_SOURCE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_DELETE_SOURCE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_DELETE_SOURCE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Create Job Folder</para>
        /// <para><xdoc>
        ///   <para>Specifies whether a folder will be created in the target path for containing the copied files.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—A folder will be created in the target path with the name of the chosen job. Files are copied from the source path to this new folder.</bullet_item><para/>
        ///     <bullet_item>Unchecked—A folder will not be created, and files from the source path will be copied directly to the target path. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否在目标路径中创建一个文件夹来包含复制的文件。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将在目标路径中创建一个文件夹，其中包含所选作业的名称。文件将从源路径复制到此新文件夹。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不会创建文件夹，源路径中的文件将直接复制到目标路径。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Create Job Folder")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _create_job_folder_value? _create_job_folder { get; set; } = null;

        public enum _create_job_folder_value
        {
            /// <summary>
            /// <para>CREATE_JOB_FOLDER</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CREATE_JOB_FOLDER")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_CREATE_JOB_FOLDER</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_CREATE_JOB_FOLDER")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Input Database Path</para>
        /// <para>The Workflow Manager (Classic) database connection file (.jtc) that contains the job information. If no connection file is specified, the current default Workflow Manager (Classic) database will be used.</para>
        /// <para>包含作业信息的 Workflow Manager （Classic） 数据库连接文件 （.jtc）。如果未指定连接文件，则将使用当前默认的 Workflow Manager （Classic） 数据库。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Database Path")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _database_path { get; set; } = null;


        /// <summary>
        /// <para>Updated Job ID</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Job ID")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public long _updated_job_id { get; set; }


        public CopyJobFiles SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}